#ifndef MENUANDTOOLBAR_H
#define MENUANDTOOLBAR_H

#include <QtGui/QMainWindow>
#include "ui_MenuAndToolBar.h"

class QLabel;
class QAction;
class QSeperator;
class QContextMenuEvent;

class MenuAndToolBar : public QMainWindow
{
	Q_OBJECT

public:
	MenuAndToolBar(QWidget *parent = 0, Qt::WFlags flags = 0);
	~MenuAndToolBar();

private:
	Ui::MenuAndToolBarClass ui;

private slots:
	void newFile();

	void cut();
	void copy();
	void paste();

	void updateStatusBar();

private:
	// create Actions for Menus
	void createActions();

	// create Menus
	void createMenus();

	// create Tool Bar
	void createToolBar();

	// create Status Bar
	void createStatusBar();

protected:
	// Context Menu
	void contextMenuEvent(QContextMenuEvent *event);

private:
	// File Menu
	QMenu *fileMenu;
	QAction *newAction;
	QAction *openAction;
	QAction *saveAction;
	QAction *saveAsAction;
	QAction *recentFilesSeperator;
	QAction *recentFilesActions;
	QAction *exitAction;

	// Edit Menu
	QMenu *editMenu;
	QAction *cutAction;
	QAction *copyAction;
	QAction *pasteAction;
	QAction *deleteAction;
	QMenu *selectSubMenu;
	QAction *selectRowAction;
	QAction *selectColAction;
	QAction *selectAllAction;

	// Options Menu
	QMenu *optionsMenu;
	QAction *showGridAction;
	QAction *showLineNumAction;

	// Help Menu
	QMenu *helpMenu;
	QAction *aboutAction;
	QAction *aboutQtAction;

	// Tool Bar
	QToolBar *fileToolBar;
	QToolBar *editToolBar;

	// Status Bar
	QLabel *showGridLabel;
	QLabel *showLineNumLabel;
};

#endif // MENUANDTOOLBAR_H
